Don’t Stop the BIBOP: Flexible and Efficient Storage Management for Dynamically Typed Languages
نویسندگان
چکیده
This paper describes a storage management system that is flexible and efficient. The representation of run-time tags yields fast allocation, type testing, and field extraction, and the memory model reduces virtual memory paging during garbage collection. The storage management system coexists gracefully with other languages’ run-time systems, facilitating the use of multiple languages within a single program. No special support from the operating system or virtual memory manager is required beyond the ability to obtain additional memory on demand. The system incorporates a generational garbage collector with a tunable number of dynamically resizable generations. The collector handles large objects efficiently, supports collection of incrementally compiled code, supports weak pairs, and allows stacks to contain nonpointer data. The system’s hybrid type representation employs typed pointers and typed objects for tagging individual objects, and BIBOP typing for classifying objects according to coarser-grained type characteristics mostly of concern only to the collector. A segmented memory model is used, but segmentation is handled transparently outside of the collector so that nearly all types of objects are allocated inline from a single linear allocation area using a single allocation pointer. The storage management system has been implemented and is in use as part of a high-performance production implementation of Scheme.
منابع مشابه
Don't Stop the BIBOP: Flexible and E cient Storage Management for Dynamically-Typed Languages
This paper describes a storage management system that is exible and eecient. The representation of run-time tags yields fast allocation, type testing, and eld extraction, and the memory model reduces virtual memory paging during garbage collection. The storage management system coexists gracefully with other languages' run-time systems, facilitating the use of multiple languages within a single...
متن کاملCompact Dispatch Tables for Dynamically Typed Object Oriented Languages
Dynamically typed object-oriented languages must perform dynamic binding for most message sends. Typically this is slow. A number of papers have reported on attempts to adapt C++-style selector table indexing to dynamically typed languages, but it is difficul to generate space-efficient tables. Our algorithm generates considerably smaller dispatch tables for languages with single inheritance th...
متن کاملEfficient Just-In-Time Execution of Dynamically Typed Languages Via Code Specialization Using Precise Runtime Type Inference
Dynamically typed languages such as JavaScript present a challenge to just-in-time compilers. In contrast to statically typed languages such as JVML, in which there are specific opcodes for common operations on primitive types (such as iadd for integer addition), all operations in dynamically typed language such as JavaScript are late-bound. Often enough, types cannot be inferred with certainty...
متن کاملType Inference to Optimize a Hybrid Statically and Dynamically Typed Language
Dynamically typed languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid prototyping, or the construction of applications that require runtime adaptiveness. In contrast, statically typed languages have undeniable advantages such as early type error detection and more opportunities for compiler optimizations. Since both approaches ...
متن کاملTaming Message Passing: Efficient Method Look-Up for Dynamically Typed Languages
Method look-up for dynamically typed object-oriented languages, such as SMALLTALK-80 or OBJECTIVE-C, is usually implemented by a cached inheritance search. Unfortunately, this technique is slow. A selector-indexed dispatch table implementation speeds up messages to within 10% of the speed of a statically typed language such as C++. We present a fast technique for generating compact selector-ind...
متن کامل